package com.study.concurrent.singleton;

/**
 * Description:
 * User: 27010
 * DateTime: 2018/6/20 23:23
 */
//懒汉式
public class Singleton1 {
    private  Singleton1 instance;
    private Singleton1() { }
    public synchronized Singleton1 getInstance(){
        if(instance == null){
            instance = new Singleton1();
        }
        return instance;
    }
}
